<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!doctype html>
<html>
<head>
	<!-- Basic Page Needs -->
	<meta charset="utf-8">
	<title>爆米花票务</title>
	<meta name="description" content="A Template by Gozha.net">
	<meta name="keywords" content="HTML, CSS, JavaScript">
	<meta name="author" content="Gozha.net">
	
	<!-- Mobile Specific Metas-->
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta content="telephone=no" name="format-detection">
	
	<!-- Fonts -->
	<!-- Font awesome - icon font -->
	<link href="http://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
	<!-- Roboto -->
	 <link href='http://fonts.useso.com/css?family=Roboto:400,100,700' rel='stylesheet' type='text/css'> 
	<!-- Open Sans -->
	<link href='http://fonts.useso.com/css?family=Open+Sans:800italic' rel='stylesheet' type='text/css'>
	
	<!-- Mobile menu -->
	<link href="css/gozha-nav.css" rel="stylesheet" />
	<!-- Select -->
	<link href="css/external/jquery.selectbox.css" rel="stylesheet" />
	
	<!-- REVOLUTION BANNER CSS SETTINGS -->
	<link rel="stylesheet" type="text/css" href="rs-plugin/css/settings.css"
		media="screen" />
	
	<!-- Custom -->
	<link href="css/style-before.css?v=1" rel="stylesheet" />
	<!-- Custom -->
	<link href="css/style.css?v=1" rel="stylesheet" />
	
	<!-- Modernizr -->
	<script src="js/external/modernizr.custom.js"></script>
	<link rel="stylesheet" href="layui/css/layui.css" media="all">
	<script src="layui/layui.js" charset="utf-8"></script>
	
	<link href="http://code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css" rel="stylesheet">
	<link rel="stylesheet" href="http://jqueryui.com/resources/demos/style.css">
	<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
	<script src="http://code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
	
	
	<script type="text/javascript" src="js/jquerysession.js"></script>

</head>

<body>
    <div class="wrapper">
        <!-- Banner -->

		<jsp:include page="header.jsp"></jsp:include>

        <!-- Slider -->
            <div class="bannercontainer">
                    <div class="banner">
                        <ul>  
                            <li data-transition="fade" data-slotamount="7" class="slide fading-slide" data-slide='Travel worldwide.
Create trip film.'>
                                <img alt='' src="images/b2.jpg">
                                 <div class="caption slide__name slide__name--smaller" 
                                     data-x="left" 
                                     data-y="160" 
                                     data-splitin="chars"
                                     data-elementdelay="0.1"
                                     data-speed="700" 
                                     data-start="1400" 
                                     data-easing="easeOutBack"
                                     data-customin="x:0;y:0;z:0;rotationX:0;rotationY:0;rotationZ:0;scaleX:1;scaleY:1;skewX:0;skewY:0;opacity:0;transformPerspective:0;transformOrigin:50% 50%;"
                                    data-frames="{ typ :lines;
                                                 elementdelay :0.1;
                                                 start:1650;
                                                 speed:500;
                                                 ease:Power3.easeOut;
                                                 animation:x:0;y:0;z:0;rotationX:0;rotationY:0;rotationZ:0;scaleX:1;scaleY:1;skewX:0;skewY:0;opacity:1;transformPerspective:600;transformOrigin:50% 50%;
                                                 },
                                                 { typ :lines;
                                                 elementdelay :0.1;
                                                 start:2150;
                                                 speed:500;
                                                 ease:Power3.easeOut;
                                                 animation:x:0;y:0;z:0;rotationX:00;rotationY:0;rotationZ:0;scaleX:1;scaleY:1;skewX:0;skewY:0;opacity:1;transformPerspective:600;transformOrigin:50% 50%;
                                                 }
                                                 "
                                    data-splitout="lines"
                                    data-endelementdelay="0.1"
                                    data-customout="x:-230;y:0;z:0;rotationX:0;rotationY:0;rotationZ:90;scaleX:0.2;scaleY:0;skewX:0;skewY:0;opacity:0;transformPerspective:600;transformOrigin:50% 50%"
                                    data-endspeed="500"                                  
                                    data-endeasing="Back.easeIn"
                                     >
                                    爆 米 花 票 务
                                </div>
                                 <div class="caption lfb slider-wrap-btn ltb" 
                                     data-x="left"
                                     data-y="310" 
                                     data-speed="400" 
                                     data-start="3300" 
                                     data-easing="Power4.easeOut"
                                     data-endspeed="500"           
                                     data-endeasing="Power4.easeOut" >
                                     <a href="#" class="btn btn-md btn--danger btn--wide slider--btn">了解更多</a>
                                 </div>
                            </li>
                            <li data-transition="fade" data-slotamount="7" class="slide" data-slide='Stop wishing. 
Start doing.'>
                                <img alt='' src="images/b3.jpg">
                                 <div class="caption slide__name slide__name--smaller slide__name--specific customin customout" 
                                     data-x="left" 
                                     data-y="160" 
                                     data-customin="x:0;y:0;z:0;rotationX:90;rotationY:0;rotationZ:0;scaleX:1;scaleY:1;skewX:0;skewY:0;opacity:0;transformPerspective:200;transformOrigin:50% 0%;"
                                     data-customout="x:0;y:0;z:0;rotationX:0;rotationY:0;rotationZ:0;scaleX:0.75;scaleY:0.75;skewX:0;skewY:0;opacity:0;transformPerspective:600;transformOrigin:50% 50%;"
                                     data-speed="700" 
                                     data-start="1400" 
                                     data-easing="easeOutBack"
                                     data-endspeed="500"
                                     data-end="8600"
                                     data-endeasing="Back.easeIn"
                                     >
                                    生活<span class="highlight">因</span> 电影 <span class="highlight">更美好</span> 
                                </div>
                                  <div class="caption slide__descript customin customout" 
                                     data-x="left" 
                                     data-y="240"
                                     data-customin="x:0;y:0;z:0;rotationX:90;rotationY:0;rotationZ:0;scaleX:1;scaleY:1;skewX:0;skewY:0;opacity:0;transformPerspective:200;transformOrigin:50% 0%;"
                                     data-customout="x:0;y:0;z:0;rotationX:0;rotationY:0;rotationZ:0;scaleX:0.75;scaleY:0.75;skewX:0;skewY:0;opacity:0;transformPerspective:600;transformOrigin:50% 50%;" 
                                     data-speed="700" 
                                     data-start="2000"
                                     data-endspeed="500"
                                     data-end="8400"
                                     data-endeasing="Back.easeIn">
                                     寻找美好生活
                                 </div>
                                 <div class="caption lfb customout slider-wrap-btn" 
                                     data-x="left" 
                                     data-y="310" 
                                     data-speed="500" 
                                     data-start="2800" 
                                     data-easing="Power4.easeOut"
                                     data-customout="x:0;y:0;z:0;rotationX:0;rotationY:0;rotationZ:0;scaleX:0.75;scaleY:0.75;skewX:0;skewY:0;opacity:0;transformPerspective:600;transformOrigin:50% 50%;" 
                                     data-endspeed="400"
                                     data-end="8000"
                                     data-endeasing="Power4.easeOut" >
                                     <a href="#" class="btn btn-md btn--danger slider--btn">了解影片</a>
                                 </div>
                            </li>
							<li data-transition="fade" data-slotamount="7" class="slide" data-slide='Rush.'>
							    <img alt='' src="images/112.jpg">
							    <div class="caption slide__name margin-slider" 
							         data-x="right" 
							         data-y="80" 
							         data-splitin="chars"
							         data-elementdelay="0.1"
							         data-speed="700" 
							         data-start="1400" 
							         data-easing="easeOutBack"
							         data-customin="x:0;y:0;z:0;rotationX:0;rotationY:0;rotationZ:0;scaleX:1;scaleY:1;skewX:0;skewY:0;opacity:0;transformPerspective:0;transformOrigin:50% 50%;"
							        data-frames="{ typ :lines;
							                     elementdelay :0.1;
							                     start:1650;
							                     speed:500;
							                     ease:Power3.easeOut;
							                     animation:x:0;y:0;z:0;rotationX:0;rotationY:0;rotationZ:0;scaleX:1;scaleY:1;skewX:0;skewY:0;opacity:1;transformPerspective:600;transformOrigin:50% 50%;
							                     },
							                     { typ :lines;
							                     elementdelay :0.1;
							                     start:2150;
							                     speed:500;
							                     ease:Power3.easeOut;
							                     animation:x:0;y:0;z:0;rotationX:00;rotationY:0;rotationZ:0;scaleX:1;scaleY:1;skewX:0;skewY:0;opacity:1;transformPerspective:600;transformOrigin:50% 50%;
							                     }
							                     "
							        data-splitout="lines"
							        data-endelementdelay="0.1"
							        data-customout="x:-230;y:0;z:0;rotationX:0;rotationY:0;rotationZ:90;scaleX:0.2;scaleY:0;skewX:0;skewY:0;opacity:0;transformPerspective:600;transformOrigin:50% 50%"
							        data-endspeed="500"
							        data-end="8400"
							        data-endeasing="Back.easeIn"
							         >
							        
							    </div>
							    <div class="caption slide__time margin-slider sfr str" 
							         data-x="right" 
							         data-hoffset='-243' 
							         data-y="186" 
							         data-speed="300" 
							         data-start="2100" 
							         data-easing="easeOutBack"
							         data-endspeed="300"
							         data-end="8700"
							         data-endeasing="Back.easeIn"
							         >
							         
							     </div>
							    <div class="caption slide__date margin-slider lfb ltb" 
							         data-x="right" 
							         data-hoffset='-149' 
							         data-y="186" 
							         data-speed="500" 
							         data-start="2400" 
							         data-easing="Power4.easeOut"
							         data-endspeed="400"
							         data-end="8200"
							         data-endeasing="Back.easeIn"
							         >
							         
							     </div>
							    <div class="caption slide__time margin-slider sfr str" 
							         data-x="right" 
							         data-hoffset='-113' 
							         data-y="186" 
							         data-speed="300" 
							         data-start="2100" 
							         data-easing="easeOutBack"
							         data-endspeed="300"
							         data-end="8700"
							         data-endeasing="Back.easeIn"
							         >
							         
							     </div>
							    <div class="caption slide__date margin-slider lfb ltb" 
							         data-x="right" 
							         data-y="186" 
							         data-speed="500" 
							         data-start="2800" 
							         data-easing="Power4.easeOut"
							         data-endspeed="400"
							         data-end="8200"
							         data-endeasing="Back.easeIn"
							         >
							         
							     </div>
							    <div class="caption slide__text margin-slider customin customout" 
							         data-x="right" 
							         data-y="250"
							         data-customin="x:0;y:100;z:0;rotationX:0;rotationY:0;rotationZ:0;scaleX:1;scaleY:3;skewX:0;skewY:0;opacity:0;transformPerspective:600;transformOrigin:0% 0%;"
							         data-customout="x:0;y:0;z:0;rotationX:0;rotationY:0;rotationZ:0;scaleX:0.75;scaleY:0.75;skewX:0;skewY:0;opacity:0;transformPerspective:600;transformOrigin:50% 50%;" 
							         data-speed="400" 
							         data-start="3000"
							         data-endspeed="400"
							         data-end="8000"
							         data-endeasing="Back.easeIn">
							         
							     </div>
							    <div class="caption margin-slider skewfromright customout " 
							         data-x="right" 
							         data-y="324"
							         data-customout="x:0;y:0;z:0;rotationX:0;rotationY:0;rotationZ:0;scaleX:0.75;scaleY:0.75;skewX:0;skewY:0;opacity:0;transformPerspective:600;transformOrigin:50% 50%;"
							         data-speed="400" 
							         data-start="3300"
							         data-easing="Power4.easeOut"
							         data-endspeed="300"
							         data-end="7700"
							         data-endeasing="Power4.easeOut">
							         
							     </div>
							</li>
                        </ul>
                    </div>
                </div>
        
        <!-- Main content -->
        <section class="container">
            <div class="movie-best">
                 <div class="col-sm-10 col-sm-offset-1 movie-best__rating">今 日 推 荐</div>
                 <div class="col-sm-12 change--col" id="moviesOKToday">
						    <!--今 日 推 荐的影片  -->                
                 </div>
                <div class="col-sm-10 col-sm-offset-1 movie-best__check">查 看 今 日 放 映</div>
            </div>

            <div class="col-sm-12">
                <div class="mega-select-present mega-select-top mega-select--full">
                    <div class="mega-select-marker">
                        <div class="marker-indecator location">
                            <p class="select-marker"><span>Find</span> <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;语 言</p>
                        </div>

                        <div class="marker-indecator cinema">
                            <p class="select-marker"><span>Find</span> <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;电 影 名</p>
                        </div>

                        <div class="marker-indecator film-category">
                            <p class="select-marker"><span>Find</span> <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;电 影 类 型</p>
                        </div>

                        <div class="marker-indecator actors">
                            <p class="select-marker"><span> Find</span> <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;演 员</p>
                        </div>

                        <div class="marker-indecator director">
                            <p class="select-marker"><span>Find</span> <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;导 演</p>
                        </div>

                        <div class="marker-indecator country">
                            <p class="select-marker"><span>Find</span> <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;国 家</p>
                        </div>
                    </div>

                      <div class="mega-select pull-right">
                          <span class="mega-select__point">Search by</span>
                          <ul class="mega-select__sort">
                              <li class="filter-wrap"><a href="#" class="mega-select__filter filter--active" data-filter='location' onclick="searchT('language')">语言</a></li>
                              <li class="filter-wrap"><a href="#" class="mega-select__filter" data-filter='cinema' onclick="searchT('moviename')">电影名</a></li>
                              <li class="filter-wrap"><a href="#" class="mega-select__filter" data-filter='film-category' onclick="searchT('mTypeName')">类别</a></li>
                              <li class="filter-wrap"><a href="#" class="mega-select__filter" data-filter='actors' onclick="searchT('mainactor')">演员</a></li>
                              <li class="filter-wrap"><a href="#" class="mega-select__filter" data-filter='director' onclick="searchT('director')">导演</a></li>
                              <li class="filter-wrap"><a href="#" class="mega-select__filter" data-filter='country' onclick="searchT('place')">国家</a></li>
                          </ul>

                          <input name="search-input" type='text' class="select__field" id="content">
                          
                          <div class="select__btn">
                             <a href="javascript:;" onclick="searchmovie('语言')" class="btn btn-md btn--danger location">搜索<span class="hidden-exrtasm">语言</span></a>
                            <a href="javascript:;" onclick="searchmovie('电影名')" class="btn btn-md btn--danger cinema">搜索<span class="hidden-exrtasm">电影名</span></a>
                            <a href="javascript:;" onclick="searchmovie('类型')" class="btn btn-md btn--danger film-category">搜索<span class="hidden-exrtasm">电影类型</span></a>
                            <a href="javascript:;" onclick="searchmovie('主演')" class="btn btn-md btn--danger actors">搜索<span class="hidden-exrtasm">演员</span></a>
                            <a href="javascript:;" onclick="searchmovie('导演')" class="btn btn-md btn--danger director">搜索<span class="hidden-exrtasm">导演</span></a>
                            <a href="javascript:;" onclick="searchmovie('地区')" class="btn btn-md btn--danger country">搜索<span class="hidden-exrtasm">国家</span></a>
                          </div>

                        
                      </div>
                  </div>
            </div>
            
            <div class="clearfix"></div>

            <h2 id='target' class="page-heading heading--outcontainer">今 日 放 映</h2>

            <div class="col-sm-12">
                <div class="row">
                    <div class="col-sm-8 col-md-9">
                         <!-- Movie variant with time -->
                         <div class="movie movie--test movie--test--dark movie--test--left" id="todaymovies1">
                            <!-- 今日放映第一部-->
                         </div>
                         <!-- Movie variant with time -->
                         <div class="movie movie--test movie--test--dark movie--test--left" id="todaymovies2">
                             <!-- 今日放映第二部 -->
                         </div>
                         <!-- Movie variant with time -->
                         <div class="movie movie--test movie--test--light movie--test--right" id="todaymovies3">
                             <!-- 今日放映第3部 -->
                         </div>
                         <!-- Movie variant with time -->
                         <div class="movie movie--test movie--test--light movie--test--right" id="todaymovies4">
                            <!-- 今日放映第3部 -->
                         </div>
                    </div>

                    <aside class="col-sm-4 col-md-3">
                        <div class="sitebar first-banner--left">
							  <div style="height: 60px;"></div>
								  <div class="category category--discuss category--count marginb-sm mobile-category ls-cat">
								      <h3 class="category__title">今日排行<br><span class="title-edition"></span></h3>
								      <ol id="moviestoday" style="padding-left:53px;">
								         	<!-- 今日排行 -->
								      </ol>
								  </div>
                          	 </div>
                        </div>
                    </aside>
                </div>
            </div>

        </section>
        
        <div class="clearfix"></div>
		
        <jsp:include page="footer.jsp"></jsp:include>
 		<jsp:include page="LoginAndRegister.jsp"></jsp:include>
 	
 	
	<!-- JavaScript-->
	<!-- jQuery 1.9.1-->
 	<script src="http://ajax.useso.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
	<script>
		window.jQuery || document.write('<script src="js/external/jquery-1.10.1.min.js"><\/script>')
	</script>
	<!-- Migrate -->
	<script src="js/external/jquery-migrate-1.2.1.min.js"></script>
	<!-- Bootstrap 3-->
	<script
		src="http://netdna.bootstrapcdn.com/bootstrap/3.0.2/js/bootstrap.min.js"></script>

	<!-- jQuery REVOLUTION Slider -->
	<script type="text/javascript" src="rs-plugin/js/jquery.themepunch.plugins.min.js"></script>
	<script type="text/javascript" src="rs-plugin/js/jquery.themepunch.revolution.min.js"></script>

	<!-- Mobile menu -->
	<script src="js/jquery.mobile.menu.js"></script>
	<!-- Select -->
	<script src="js/external/jquery.selectbox-0.2.min.js"></script>
	<!-- Stars rate -->
	<script src="js/external/jquery.raty.js"></script>

	<!-- Form element -->
	<script src="js/external/form-element.js"></script>
	<!-- Form validation -->
	<script src="js/form.js"></script>

	<!-- Custom -->

	<script src="js/custom.js"></script>
	
	<script type="text/javascript" src="js/jquery.cookie.js"></script>
	
	<script src="js/customf.js"></script>
	
	<jsp:include page="JudegeLogin.jsp"></jsp:include>
		
	<script type="text/javascript">
		$(function(){
			//获取今日推荐的影评
			$.get("getmOK",function(data){
				
				$.each(data,function(i,v){
					//查询电影的类别
					var movieType=getmtype(v.movieid);
					
					//查询有多少人看过
					var ticketNum=getmtcount(v.movieid);
					
					//拼接
					$("#moviesOKToday").append("<div class='movie-beta__item'>"
					+"<img alt='' src='"+v.moviepicture+"'><span class='best-rate'>"+v.score+"</span>"
					+"<ul class='movie-beta__info'><li><span class='best-voted'>"+v.moviename+"</span></li>"
					+"<li><p>导演："+v.director+"</p><p>主演："+v.mainactor+"</p><p style='position: absolute;''>"+movieType+"</p><br/>"
					+"<p class='movie__time' style='position: relative;margin-top: 1px;'>"+v.duration+" min</p>"
					+"<p>"+ticketNum+"人 观看过这部电影</p></li>"
					+"<li class='last-block'><a href='movie-page-full.jsp?movieid="+v.movieid+"' class='slide__link'>more</a>"
					+"</li></ul></div>");
				});
			});
			//获取该电影有多少人看过
			function getmtcount(movieId){
				var result;
				$.ajax({
					type:"GET",
					url:"getmtnum",
					data:{
						movieId:movieId
					},
					async : false,
					success:function(data){
						//给result赋值
						result=data ;
					},
					dataType:"json"
				});
				return result;
			}
			//获取电影的类别
			function getmtype(movieId){
				var result="";
				$.ajax({
					type:"GET",
					url:"getmtypes",
					data:{
						movieId:movieId
					},
					async : false,
					success:function(data){
						//对返回值进行拼接
						for(var i=0;i<data.length;i++){
							if(i==0){
								result+=data[i].moviename;
							}else{
								result+=" | "+data[i].moviename;
							}
						}
						
					},
					dataType:"json"
				});
				return result;
			}
			
			//获取电影的评分
			function getmscore(movieId){
				var result="";
				$.ajax({
					type:"GET",
					url:"getmscore",
					data:{
						movieId:movieId
					},
					async : false,
					success:function(data){
						//给result赋值
						result=data[0].score ;
						
					},
					dataType:"json"
				});
				return result;
			}
			
			//获取今日放映前四名的详细信息
			$.get("getmtodayfour",function(data){
				
				$.each(data,function(i,v){
					//查询电影的类别
					var movieType=getmtype(v.movieid);
					//获取电影的评分
					var movieScore=getmscore(v.movieid);
					
					if(i==0){
						//拼接
						$("#todaymovies1").append("<div class='movie__images'>"
                           +"<a href='movie-page-full.jsp?movieid="+v.movieid+"' class='movie-beta__link'>"
                           +"<img alt='' src='"+v.moviepicture+"'></a></div>"
                           +"<div class='movie__info'>"
                           +"<a href='movie-page-full.jsp?movieid="+v.movieid+"' class='movie__title'>"+v.moviename+"</a>"
                           +"<p class='movie__option'>导演 ："+v.director+"</p>"
                           +"<p class='movie__option'>主演： "+v.mainactor+"</p>"
                           +"<p class='movie__option' style='position: absolute;'>"+movieType+"</p><br/>"
                           +"<p class='movie__time' style='position: relative;margin-top: 4px;'>"+v.duration+" min</p>"
                           +"<div><p class='movie__option'>简介："+v.movieinfo+"</p>"
                           +"</div><div id='"+v.movieid+"' style='display: inline;'></div>"
                           +"<div class='movie__rate'style='position: absolute;margin-left: 13px; margin-bottom: 20px;'>"
                           +"<span class='movie__rating'>"+movieScore+"</span></div></div></div>");
					}else if(i==1){
						//拼接
						$("#todaymovies2").append("<div class='movie__images'>"
                           +"<a href='movie-page-full.jsp?movieid="+v.movieid+"' class='movie-beta__link'>"
                           +"<img alt='' src='"+v.moviepicture+"'></a></div>"
                           +"<div class='movie__info'>"
                           +"<a href='movie-page-full.html?movieid="+v.movieid+"' class='movie__title'>"+v.moviename+"</a>"
                           +"<p class='movie__option'>导演 ："+v.director+"</p>"
                           +"<p class='movie__option'>主演： "+v.mainactor+"</p>"
                           +"<p class='movie__option' style='position: absolute;'>"+movieType+"</p><br/>"
                           +"<p class='movie__time' style='position: relative;margin-top: 4px;'>"+v.duration+" min</p>"
                           +"<p class='movie__option'>简介："+v.movieinfo+"</p>"
                           +"<div id='"+v.movieid+"' style='display: inline;'></div>"
                           +"<div class='movie__rate' style='position: absolute;margin-left: 13px; margin-bottom: 20px;'>"
                           +"<span class='movie__rating'>"+movieScore+"</span></div></div></div>");
					}else if(i==2){
						//拼接
						$("#todaymovies3").append("<div class='movie__images'>"
                           +"<a href='movie-page-full.jsp?movieid="+v.movieid+"' class='movie-beta__link'>"
                           +"<img alt='' src="+v.moviepicture+"></a></div>"
                           +"<div class='movie__info'>"
                           +"<a href='movie-page-full.html?movieid="+v.movieid+"' class='movie__title'>"+v.moviename+"</a>"
                           +"<p class='movie__option'>导演 ："+v.director+"</p>"
                           +"<p class='movie__option'>主演： "+v.mainactor+"</p>"
                           +"<p class='movie__option' style='position: absolute;'>"+movieType+"</p><br/>"
                           +"<p class='movie__time' style='position: relative;margin-top: 4px;'>"+v.duration+" min</p>"
                           +"<div><p class='movie__option'>简介："+v.movieinfo+"</p>"
                           +"</div><div id='"+v.movieid+"' style='display: inline;'></div>"
                           +"<div class='movie__rate'style='position: absolute;margin-left: 13px; margin-bottom: 20px;'>"
                           +"<span class='movie__rating'>"+movieScore+"</span></div></div>");
					}else if(i==3){
						//拼接
						$("#todaymovies4").append("<div class='movie__images''>"
                           +"<a href='movie-page-full.jsp?movieid="+v.movieid+"' class='movie-beta__link'>"
                           +"<img alt='' src="+v.moviepicture+" ></a></div>"
                           +"<div class='movie__info'>"
                           +"<a href='movie-page-left.html?movieid="+v.movieid+"' class='movie__title'>"+v.moviename+"</a>"
                           +"<p class='movie__option'>导演 ："+v.director+"</p>"
                           +"<p class='movie__option'>主演： "+v.mainactor+"</p>"
                           +"<p class='movie__option'style='position: absolute;'>"+movieType+"</p><br/>"
                           +"<p class='movie__time'style='position: relative;margin-top: 4px;'>"+v.duration+" min</p>"
                           +"<div><p class='movie__option'>简介："+v.movieinfo+"</p>"
                           +"</div><div id='"+v.movieid+"' style='display: inline;'></div>"
                           +"<div class='movie__rate' style='position: absolute;margin-left: 13px; margin-bottom: 20px;'>"
                           +"<span class='movie__rating'>"+movieScore+"</span></div></div>");
					}
					//给星星赋值
					layui.use(['rate'], function(){
						  var rate = layui.rate;
						  
						  rate.render({
							    elem: '#'+v.movieid
							    ,value: movieScore
							    ,half: true //开启半星
							    ,readonly: true
							  });
						  
					});
					
				});
			});
		});
	</script>
	<script type="text/javascript">
		$(function(){
			//获取今日排行
			$.get("getmtoday",function(data){
				$.each(data,function(i,v){
					//拼接
					$("#moviestoday").append("<li><a href=movie-page-full.jsp?movieid="+v.movieid+" class='category__item'>"+(i+1)+"、"+v.moviename+"</a></li>");
				});
				
			});
		});
	</script>
	
	<script type="text/javascript">
		$(document).ready(function() {
			init_Home();
		});
	</script>
	
	<script type="text/javascript">
		function searchmovie(basis){
			var content = $("#content").val();
			location.href = "http://localhost:8080/My_Popcorn/movie-playing-general.jsp?key="+content+"&select="+basis;
		}
	</script>
	
	<script type="text/javascript">
		function searchT(type) {
			console.log(type);
			var data = {};
			key = type;
			value = type;
			data[key] = value;
			console.log(data);
			$.ajax({
				url : "gws",
				type : "post",
				dataType : "json",
				data : data,
				success : function(data) {
					$("#content").autocomplete({
						source : data,
						select : function(event, ul){
						var keywords = 	ul.item.value;//这个keywords就是点击之后获取的那个关键字
						//在这里是写点击搜索跳转函数
						}
					})
				}
			});
		}
	</script>
		
</body>
</html>
